package ie.hurley.model;

import java.io.Serializable;

import org.apache.commons.lang.builder.EqualsBuilder;

public class BaseModel implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private String id;
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	@Override
	public boolean equals(Object obj){
		if(obj == this){
			return true;
		}
		if(!(obj instanceof BaseModel)){
			return false;
		}
		BaseModel target = (BaseModel)obj;
		if(target.getId() != null){
			return (target.getId().equals(this.getId()));
		}
		return EqualsBuilder.reflectionEquals(this, obj);
	}
	@Override
	public int hashCode() {
		// TODO Auto-generated method stub
		return super.hashCode();
	}
	
	
}
